package com.xjtu.platform.common;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 静态资源映射
 */
@Component
public class MyWebConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/fig/**")
                .addResourceLocations("file:/root/ALD/fig/");
        registry.addResourceHandler("/ans/**")
                .addResourceLocations("file:/root/ALD/ans/");
        registry.addResourceHandler("/pic/**")
                .addResourceLocations("file:/root/ALDShow/Data/");
        registry.addResourceHandler("/wav/**")
                .addResourceLocations("file:/root/ALD/wav/");


    }

    //        registry.addResourceHandler("/ans/**")
//                .addResourceLocations("file:/root/ALD/ans/");

    // /app/Data/   d:/test/
}
